package com.kaifamiao.charstreams;

import java.io.*;

public class ReadCustomerInput {

    public static void main(String[] args) throws IOException {
        // 获得 "标准"输入流 (默认的标准输入流就是键盘输入流)
        InputStream in = System.in;
        Reader r = new InputStreamReader( in );
        BufferedReader br = new BufferedReader( r );

        System.out.println( "请输入用户名" );
        String username = br.readLine();
        System.out.println( "username: " + username );

        br.close();
        r.close();
        in.close();
    }

}
